package com.chushouya.manager.config;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 阿里云OSS配置
 */
@Data
@Component
@ConfigurationProperties(prefix = "com.aliyun.oss")
public class OssProperties {

    private String regionId = "cn-shenzhen";

    @ApiModelProperty("终端地址")
    private String endpoint;

    @ApiModelProperty("bucket")
    private String bucket;

    @ApiModelProperty("accessKeyId")
    private String accessKeyId;

    @ApiModelProperty("accessKeySecret")
    private String accessKeySecret;

    @ApiModelProperty("授权策略")
    private String policy;

    @ApiModelProperty("域名")
    private String host;

    @ApiModelProperty("授权过期时间")
    private Long durationSeconds;

    @ApiModelProperty("角色的ARN")
    private String roleArn;

    @ApiModelProperty("用户自定义参数。此参数用来区分不同的令牌")
    private String roleSessionName;

    @ApiModelProperty("OSS上传回调URL")
    private String callbackUrl;

}
